<%= render 'order_actions', order: @order, events: @order_events %>

<%= render 'spree/admin/shared/order_tabs', current: :cart %>

<div data-hook="admin_order_edit_header">
  <%= render 'spree/admin/shared/error_messages', target: @order %>
</div>

<% if @order.payments.exists? && @order.considered_risky? %>
  <%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.order("created_at DESC").first %>
<% end %>

<%= render 'add_line_item' if can?(:update, @order) %>

<% if @order.line_items.empty? %>
  <div class="alert alert-warning">
    <%= Spree.t(:your_order_is_empty_add_product)%>
  </div>
<% end %>

<div data-hook="admin_order_edit_form">
  <div id="order-form-wrapper">
    <%= render 'line_items_edit_form', order: @order %>
  </div>
</div>

<%= render 'spree/admin/shared/order_summary' %>
